import Vue from 'vue'
import Vuex from 'vuex'
import userInfo from './modules/userInfo'
import cart from './modules/cart'
Vue.use(Vuex)

export default new Vuex.Store({
  getters: {
    isLogin (state) {
      return state.userInfo.userMessage.token ? state.userInfo.userMessage.token : 0
    }
  },
  modules: {
    userInfo,
    cart
  }
})
